from config.protocol.http_protocol import HttpProtocol
from bussiness.feishu_api import FeiShuApi
from utils.log_utils import logger



class Calendar(FeiShuApi):
    def create(self,summary="何沛珊",description="何沛珊创建的日历",permissions="private",color=-1,summary_alias="何沛珊VS何奕麟"):
        url = "calendar/v4/calendars"

        calendar_data = {
    "summary": summary,
    "description": description,
    "permissions": permissions,
    "color": color,
    "summary_alias": summary_alias
}
        r = self.feishu_req("POST",url,json=calendar_data)

        return r

    def delete(self):
        pass
    def get(self,calendar_id):
        url = f"calendar/v4/calendars/{calendar_id}"

        r = self.feishu_req("get",url)
        return r

    def update(self):
        pass